<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.2.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/blog/images/logo.svg" color="#222">

<link rel="stylesheet" href="/blog/css/main.css">


<link rel="stylesheet" href="/blog/lib/font-awesome/css/all.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"ios103.gitee.io","root":"/blog/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":false,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}}};
  </script>

  <meta name="description" content="Linux（CentOS7）常用命令详解 一、Linux的树型目录结构 在详解常用命令之前，先对Linux的树型目录结构做个简单的了解，如下所示：  简单说明： 12345678910111213141516171819202122232425262728293031&#x2F;      #根目录&#x2F;bin   #基础系统所需要的命令位于此目录，是最小系统所需要的命令，如：ls， cp， cd等等。这个目录">
<meta property="og:type" content="article">
<meta property="og:title" content="Linux（CentOS7）常用命令详解">
<meta property="og:url" content="https://ios103.gitee.io/2020/10/12/Linux%EF%BC%88CentOS7%EF%BC%89%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E8%AF%A6%E8%A7%A3/index.html">
<meta property="og:site_name" content="小龙人的妙妙屋">
<meta property="og:description" content="Linux（CentOS7）常用命令详解 一、Linux的树型目录结构 在详解常用命令之前，先对Linux的树型目录结构做个简单的了解，如下所示：  简单说明： 12345678910111213141516171819202122232425262728293031&#x2F;      #根目录&#x2F;bin   #基础系统所需要的命令位于此目录，是最小系统所需要的命令，如：ls， cp， cd等等。这个目录">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2020-10-12T08:25:51.000Z">
<meta property="article:modified_time" content="2020-10-12T10:12:01.511Z">
<meta property="article:author" content="小龙人">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://ios103.gitee.io/2020/10/12/Linux%EF%BC%88CentOS7%EF%BC%89%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E8%AF%A6%E8%A7%A3/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>Linux（CentOS7）常用命令详解 | 小龙人的妙妙屋</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/blog/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">小龙人的妙妙屋</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-home">

    <a href="/blog/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/blog/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/blog/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a>

  </li>
  </ul>
</nav>




</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://ios103.gitee.io/2020/10/12/Linux%EF%BC%88CentOS7%EF%BC%89%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E8%AF%A6%E8%A7%A3/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/blog/images/avatar.gif">
      <meta itemprop="name" content="小龙人">
      <meta itemprop="description" content="">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="小龙人的妙妙屋">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          Linux（CentOS7）常用命令详解
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
              

              <time title="创建时间：2020-10-12 16:25:51 / 修改时间：18:12:01" itemprop="dateCreated datePublished" datetime="2020-10-12T16:25:51+08:00">2020-10-12</time>
            </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/Linux/" itemprop="url" rel="index"><span itemprop="name">Linux</span></a>
                </span>
            </span>

          

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <p><a target="_blank" rel="noopener" href="https://www.cnblogs.com/yangfei123/p/12758414.html">Linux（CentOS7）常用命令详解</a></p>
<h5 id="一、Linux的树型目录结构"><a href="#一、Linux的树型目录结构" class="headerlink" title="一、Linux的树型目录结构"></a>一、Linux的树型目录结构</h5><blockquote>
<p>在详解常用命令之前，先对Linux的树型目录结构做个简单的了解，如下所示：</p>
</blockquote>
<p>简单说明：</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br></pre></td><td class="code"><pre><span class="line">/      <span class="comment">#根目录</span></span><br><span class="line">/bin   <span class="comment">#基础系统所需要的命令位于此目录，是最小系统所需要的命令，如：ls， cp， cd等等。这个目录中的文件都是可执行的，一般的用户都可以使用。</span></span><br><span class="line">/dev   <span class="comment">#设备文件，比如声卡、磁盘、鼠标、键盘等。</span></span><br><span class="line">/etc  <span class="comment">#系统管理和配置文件</span></span><br><span class="line">/etc/init.d   <span class="comment">#启动配置文件和脚本,可在这里添加启动脚本。</span></span><br><span class="line">/etc/rc.local   <span class="comment">#用户添加启动项</span></span><br><span class="line">/home  <span class="comment">#用户主目录，比如用户user的主目录就是/home/user，可以用~user表示</span></span><br><span class="line">/lib   <span class="comment">#标准程序设计库存放路径，又叫动态链接共享库，作用类似windows里的.dll文件</span></span><br><span class="line">/sbin  <span class="comment">#超级管理命令，这里存放的是系统管理员使用的管理程序。</span></span><br><span class="line">/tmp   <span class="comment">#临时文件目录，有时用户运行程序的时候，会产生临时文件。 /tmp就用来存放临时文件的。</span></span><br><span class="line">/root  <span class="comment">#系统管理员的主目录</span></span><br><span class="line">/mnt   <span class="comment">#用来临时挂载其他的文件系统</span></span><br><span class="line">/lost+found   <span class="comment">#这个目录平时是空的，系统意外崩溃或机器意外关机，而产生一些文件碎片放在这里。当系统启动的过程中fsck工具会检查这里，并修复已经损坏的文件系统。</span></span><br><span class="line">/media      <span class="comment">#即插即用型存储设备的挂载点自动在这个目录下创建，比如USB盘系统自动挂载后，会在这个目录下产生一个目录 </span></span><br><span class="line">/proc  <span class="comment">#虚拟文件目录，可直接访问这个目录来获取系统信息。</span></span><br><span class="line">/var   <span class="comment">#所有服务的登录文件或错误讯息档案（log files）都在 /var/log 里面</span></span><br><span class="line">/boot  <span class="comment">#包含Linux内核及系统引导程序所需要的文件，比如 vmlinuz initrd.img 文件都位于这个目录中。在一 般情况下，GRUB或LILO系统引导管理器也位于这个目录；</span></span><br><span class="line">/usr   <span class="comment">#最庞大的目录，要用到的应用程序和文件几乎都在这个目录，其中包含：</span></span><br><span class="line">  usr/bin     <span class="comment">#众多的应用程序</span></span><br><span class="line">  /usr/sbin     <span class="comment">#超级用户的一些管理程序</span></span><br><span class="line">  /usr/include  <span class="comment">#Linux下开发和编译应用程序所需要的头文件</span></span><br><span class="line">  /usr/lib     <span class="comment">#常用的动态链接库</span></span><br><span class="line">  /usr/share/man  <span class="comment">#帮助文档</span></span><br><span class="line">  /usr/src     <span class="comment">#源代码，Linux内核的源代码就放在/usr/src/Linux里</span></span><br><span class="line">  /usr/<span class="built_in">local</span>/bin  <span class="comment">#本地增加的命令</span></span><br><span class="line">  /usr/<span class="built_in">local</span>/lib  <span class="comment">#本地增加的库根文件系统</span></span><br><span class="line">. ：代表当前路径</span><br><span class="line"></span><br><span class="line">.. ：代表上一级目录</span><br><span class="line"></span><br><span class="line">~ ：代表用户目录路径</span><br></pre></td></tr></table></figure>



<h5 id="二、常用命令详解"><a href="#二、常用命令详解" class="headerlink" title="二、常用命令详解"></a>二、常用命令详解</h5><h6 id="2-1-ls-命令"><a href="#2-1-ls-命令" class="headerlink" title="2.1 ls 命令"></a>2.1 ls 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">ls是英文单词list的缩写.用来查看文件目录的属性。</span><br><span class="line"></span><br><span class="line">例如直接输入ls按回车，查看根目录的文件以及目录。</span><br></pre></td></tr></table></figure>

<h6 id="2-1-1-ls-l命令"><a href="#2-1-1-ls-l命令" class="headerlink" title="2.1.1 ls -l命令"></a>2.1.1 ls -l命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line">ls -­l  l参数代表以列表的方式显示。</span><br><span class="line"></span><br><span class="line">  <span class="comment">#第一个字符d 代表这是一个目录文件。</span></span><br><span class="line">  <span class="comment"># ‐  代表普通文件</span></span><br><span class="line">  <span class="comment"># c  字符设备文件</span></span><br><span class="line">  <span class="comment"># b  块设备文件</span></span><br><span class="line">  <span class="comment"># p  管道文件</span></span><br><span class="line">  <span class="comment"># l  链接文件</span></span><br><span class="line">  <span class="comment"># s  socket文件</span></span><br><span class="line"><span class="comment">#后面的rwxr‐xr‐x字符，代表user、group、other对文件所拥有的权限，rwx代表该用户拥有读写执行的权限。r‐x</span></span><br><span class="line">代表同一组的用户拥有的读和执行权限，后一个r‐x代表其他用户拥有读和执行权限。</span><br><span class="line"><span class="comment"># 2代表文件硬链接的计数，表示该文件有两个硬链接。</span></span><br><span class="line"><span class="comment"># where 文件所属的用户名。</span></span><br><span class="line"><span class="comment"># where  文件所属的用户组。</span></span><br><span class="line"><span class="comment"># 4096 文件大小，单位字节。</span></span><br><span class="line"><span class="comment"># 6月 25 16:53  文件最后被修改的日期。</span></span><br><span class="line"><span class="comment"># Videos 文件名</span></span><br></pre></td></tr></table></figure>



<h6 id="2-1-2-ls-a命令"><a href="#2-1-2-ls-a命令" class="headerlink" title="2.1.2 ls -a命令"></a>2.1.2 ls -a命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">ls -a ­a参数代表all的意思，表示把所有的文件都罗列出来，包括隐藏文件，点号开头的在Linux中都表示隐藏文件。</span><br><span class="line"> </span><br><span class="line"></span><br><span class="line"> ls ‐ld [filename] 代表只列出目录文件的属性。</span><br></pre></td></tr></table></figure>



<h6 id="2-2-stat命令"><a href="#2-2-stat命令" class="headerlink" title="2.2 stat命令"></a>2.2 stat命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">查看文件的访问时间，修改时间等</span><br><span class="line">访问时间，是指通过指令如cat、vi等来查看的文件的最近一次时间。更改时间，是指修改文件内容的最近一次时间。</span><br><span class="line">改动时间，是指修改文件属性的最近一次时间。</span><br><span class="line">注意：访问时间是内容更改后，第一次访问的时间，后面再次访问的时候访问时间不会改变</span><br></pre></td></tr></table></figure>





<h6 id="2-3-cd命令"><a href="#2-3-cd命令" class="headerlink" title="2.3 cd命令"></a>2.3 cd命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cd 是 change directory的缩写，表示改变当前所在路径。</span><br></pre></td></tr></table></figure>

<h6 id="2-4-pwd命令"><a href="#2-4-pwd命令" class="headerlink" title="2.4 pwd命令"></a>2.4 pwd命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pwd 是英文print working directory 显示当前所在路径。</span><br></pre></td></tr></table></figure>

<h6 id="2-5-which命令"><a href="#2-5-which命令" class="headerlink" title="2.5 which命令"></a>2.5 which命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">寻找可执行文件 ，并在PATH环境变量里面寻找</span><br></pre></td></tr></table></figure>

<h6 id="2-6-touch命令"><a href="#2-6-touch命令" class="headerlink" title="2.6 touch命令"></a>2.6 touch命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">将每个文件的访问及修改时间都更新为目前的时间。</span><br><span class="line"></span><br><span class="line">如果文件不存在，则创建一个字节数为0的文件。</span><br><span class="line"></span><br><span class="line">‐a           <span class="comment">#只更新访问时间，不改变修改时间</span></span><br><span class="line">‐c           <span class="comment">#不创建不存在的文件</span></span><br><span class="line">‐m           <span class="comment">#只更新修改时间，不改变访问时间</span></span><br><span class="line">‐r file      <span class="comment">#使用文件file的时间更新文件的时间</span></span><br><span class="line">‐t           <span class="comment">#将时间修改为参数指定的日期,如：07081556代表7月8号15点56分</span></span><br></pre></td></tr></table></figure>



<h6 id="2-7-mkdir-命令"><a href="#2-7-mkdir-命令" class="headerlink" title="2.7 mkdir 命令"></a>2.7 mkdir 命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">mkdir 是make directory的英文缩写。</span><br><span class="line">创建目录DIRECTORY，可以一次创建多个。OPTION如果是­p，表示可以连同父目录一起创建。</span><br></pre></td></tr></table></figure>



<h6 id="2-8-rmdir-命令"><a href="#2-8-rmdir-命令" class="headerlink" title="2.8 rmdir 命令"></a>2.8 rmdir 命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">rmdir是remove directory的英文缩写。</span><br><span class="line">删除空目录，可以一次删除多个。OPTION如果是­p，表示可以连同空的父目录一起删除。但是一旦父目录中还包含其他文件，则删除失败。</span><br></pre></td></tr></table></figure>



<h6 id="2-9-rm-命令"><a href="#2-9-rm-命令" class="headerlink" title="2.9 rm 命令"></a>2.9 rm 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">rm是remove的英文缩写。</span><br><span class="line">可以用来删除普通文件，也可以用来删除目录，特别用来删除目录中嵌套有子目录的目录文件。</span><br><span class="line">常用参数：</span><br><span class="line"></span><br><span class="line">‐f  ‐‐force  <span class="comment">#强制删除，不询问是否要删除。</span></span><br><span class="line">‐r  ‐‐recursive  <span class="comment">#递归删除，包括文件夹中的内容。</span></span><br></pre></td></tr></table></figure>





<h6 id="2-10-mv命令"><a href="#2-10-mv命令" class="headerlink" title="2.10 mv命令"></a>2.10 mv命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">mv是英文单词move的缩写。可以用来移动文件夹或者文件，也可以用来更改文件名。</span><br><span class="line">mv file / <span class="comment">#把文件file移动到根目录中</span></span><br><span class="line"></span><br><span class="line">mv file file_bak <span class="comment">#把文件file重命名为file_bak。</span></span><br></pre></td></tr></table></figure>



<h6 id="2-11-cp命令"><a href="#2-11-cp命令" class="headerlink" title="2.11 cp命令"></a>2.11 cp命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">cp是英文单词copy的缩写，表示拷贝文件。</span><br><span class="line"></span><br><span class="line">可以用来拷贝普通文件：</span><br><span class="line">cp file file_bak <span class="comment">#拷贝一份file为file_bak</span></span><br><span class="line"></span><br><span class="line">可以用来拷贝目录</span><br><span class="line">cp dir dir_bak ‐r <span class="comment">#拷贝一个目录dir为dir_bak, ‐r参数代表递归拷贝，把dir目录中的文件也拷贝过去</span></span><br></pre></td></tr></table></figure>





<h6 id="2-12-cat命令"><a href="#2-12-cat命令" class="headerlink" title="2.12 cat命令"></a>2.12 cat命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">cat英文单词concatenate连锁的缩写，用来查看文件内容，以及将几个文件连成一个文件，</span><br><span class="line">不填文件参数，默认的情况下是从标准输入中获取内容： </span><br><span class="line"></span><br><span class="line">查看文件： cat fileName</span><br><span class="line"></span><br><span class="line">将文件file1 file2连成file3文件</span><br><span class="line">cat file1 file2 &gt; file3</span><br></pre></td></tr></table></figure>





<h6 id="2-13-more命令"><a href="#2-13-more命令" class="headerlink" title="2.13 more命令"></a>2.13 more命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">more 是我们最常用的工具之一，最常用的就是显示输出的内容，然后根据窗口的大小进行分页显示，并且提示文件的百分比。</span><br><span class="line">参数如下：</span><br><span class="line"></span><br><span class="line">+num    <span class="comment">#从第num行开始显示；</span></span><br><span class="line">‐num    <span class="comment">#定义每屏显示num行；</span></span><br><span class="line"></span><br><span class="line">打开之后的动作：</span><br></pre></td></tr></table></figure>





<h6 id="2-14-less命令"><a href="#2-14-less命令" class="headerlink" title="2.14 less命令"></a>2.14 less命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">less工具也是对文件或其它输出进行分页显示的工具</span><br><span class="line"></span><br><span class="line">参数如下:</span><br><span class="line"></span><br><span class="line">‐f    <span class="comment">#强制打开文件，二进制文件显示时，不提示警告；</span></span><br><span class="line">‐N    <span class="comment">#在每行前输出行号；</span></span><br><span class="line"></span><br><span class="line">打开之后的动作：</span><br></pre></td></tr></table></figure>



<h6 id="2-15-locate-命令"><a href="#2-15-locate-命令" class="headerlink" title="2.15 locate 命令"></a>2.15 locate 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">全盘寻找文件，文件名部分匹配，只要有包含该字符串的都罗列出来，这个指令查找速度很快，它需要一个数据库，这个数据库由每天的例行工作（crontab）程序来更新。当我们建立好这个数据库后，就可以方便地来搜寻</span><br><span class="line">所需文件了。</span><br><span class="line"></span><br><span class="line">马上创建的文件没办法使用locate查找到:如果想马上更新可以使用一下指令：updatedb</span><br></pre></td></tr></table></figure>



<h6 id="2-16-find-命令"><a href="#2-16-find-命令" class="headerlink" title="2.16 find 命令"></a>2.16 find 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br></pre></td><td class="code"><pre><span class="line">直接在全文件系统上搜寻，功能强大，速度慢。</span><br><span class="line"></span><br><span class="line">格式：</span><br><span class="line"></span><br><span class="line">find [path] [‐option] [ ‐<span class="built_in">print</span> ‐<span class="built_in">exec</span> ‐ok <span class="built_in">command</span> ] &#123;&#125; \;</span><br><span class="line"></span><br><span class="line">path:   <span class="comment">#要执行查找的目录。</span></span><br><span class="line">‐option: <span class="comment">#查找的具体方法。</span></span><br><span class="line">‐<span class="built_in">print</span>： <span class="comment">#find命令将匹配的文件输出到标准输出。</span></span><br><span class="line">‐<span class="built_in">exec</span>：  <span class="comment">#find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为&#x27;command&#x27; &#123;&#125; \;，注意&#123;&#125;和</span></span><br><span class="line">\；之间的空格。</span><br><span class="line">‐ok：    <span class="comment">#和‐exec的作用相同，只不过以一种更为安全的模式来执行该参数所给出的shell命令，在执行每一个命令</span></span><br><span class="line">之前，都会给出提示，让用户来确定是否执行。</span><br><span class="line"></span><br><span class="line">find / ‐name filename   <span class="comment">#在根目录里面搜索文件名为filename的文件</span></span><br><span class="line">find /etc ‐name *s*     <span class="comment">#在目录里面搜索带有s的文件</span></span><br><span class="line">find /etc ‐name *S      <span class="comment">#在目录里面搜索以s结尾的文件</span></span><br><span class="line">find /etc ‐name s*      <span class="comment">#在目录里面搜索以s开头的文件</span></span><br><span class="line">find / ‐amin ‐10        <span class="comment">#在系统中搜索最后１０分钟访问的文件</span></span><br><span class="line">find / ‐atime ‐2        <span class="comment">#查找在系统中最后４８小时访问的文件</span></span><br><span class="line">find / ‐mmin ‐5         <span class="comment">#查找在系统中最后５分钟修改过的文件</span></span><br><span class="line">find / ‐mtime ‐1        <span class="comment">#查找在系统中最后２４小时修改过的文件</span></span><br><span class="line">find / ‐ctime ‐1        <span class="comment">#查找在系统中最后２４小时被改变状态的文件</span></span><br><span class="line">find / ‐user username   <span class="comment">#查找在系统中属于用户username的文件</span></span><br><span class="line">find / ‐group groupname  <span class="comment">#groupname 查找在系统中属于groupname的文件</span></span><br><span class="line">find / ‐empty           <span class="comment">#查找在系统中为空的文件或者是文件夹</span></span><br><span class="line">find / ‐inum 3          <span class="comment">#查找inode号为3的文件</span></span><br><span class="line">find / ‐<span class="built_in">type</span> d          <span class="comment">#查找为文件类型为文件夹的文件d为文件夹</span></span><br><span class="line">                                f     <span class="comment">#普通文件</span></span><br><span class="line">                                d     <span class="comment">#目录文件</span></span><br><span class="line">                                l     <span class="comment">#链接文件</span></span><br><span class="line">                                b     <span class="comment">#块设备文件</span></span><br><span class="line">                                c     <span class="comment">#字符设备文件</span></span><br><span class="line">                                p     <span class="comment">#管道文件</span></span><br><span class="line">                                s     <span class="comment">#socket文件</span></span><br></pre></td></tr></table></figure>



<h6 id="2-17-grep-命令"><a href="#2-17-grep-命令" class="headerlink" title="2.17 grep 命令"></a>2.17 grep 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">搜索内容中是否包含指定的字符串，并打印出该行。</span><br><span class="line"></span><br><span class="line">常用参数有：</span><br><span class="line"></span><br><span class="line">‐i    ‐‐ignore‐<span class="keyword">case</span>   <span class="comment">#忽略字符大小写的差别。</span></span><br><span class="line">    ‐v                    <span class="comment">#输出没有指定字符串的文件</span></span><br><span class="line">    ‐c                    <span class="comment">#只输出匹配行的计数。</span></span><br><span class="line">    ‐R                    <span class="comment">#连同子目录中所有文件一起查找。</span></span><br></pre></td></tr></table></figure>



<h6 id="2-18-ln命令"><a href="#2-18-ln命令" class="headerlink" title="2.18 ln命令"></a>2.18 ln命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">ln是英文单词link的缩写，用来创建链接的命令。</span><br><span class="line">   Linux链接分两种，一种被称为硬链接（Hard Link），另一种被称为符号链接（Symbolic Link）。默认情况下，ln命令产生硬链接。</span><br><span class="line">【硬链接】</span><br><span class="line">   硬链接指通过索引节点来进行链接。在Linux的文件系统中，保存在磁盘分区中的文件不管是什么类型都给它分配一个编号，称为索引节点号(Inode Index)。在Linux中，多个文件名指向同一索引节点，一般这种链接就是硬链接。</span><br><span class="line"></span><br><span class="line">   硬链接的作用是允许一个文件拥有多个有效路径名，这样用户就可以建立硬链接到重要文件，以防止“误删”。</span><br><span class="line">   如果有多个硬链接，只删除一个链接并不影响本身和其它的链接，只有当最后一个链接被删除后，文件的才会被正在删除。也就是说，文件真正删除的条件是与之相关的所有硬链接文件均被删除。</span><br><span class="line">【软链接】</span><br><span class="line">   另外一种链接称之为符号链接（Symbolic Link），也叫软链接。软链接文件有类似于Windows的快捷方式。它实际上是一个特殊的文件。符号链接文件实际上是一个文本文件，其中包含的有另一文件的位置信息。</span><br><span class="line"></span><br><span class="line">给flie文件创建一个硬链接</span><br><span class="line">touch file</span><br><span class="line">ln file file_hard</span><br><span class="line"></span><br><span class="line">给file文件创建一个软链接</span><br><span class="line">touch file</span><br><span class="line">ln ‐s file flie_soft</span><br><span class="line"></span><br><span class="line">注意: 软链接的时候尽量使用绝对路径，避免由于链接文件移动后，造成文件失效。</span><br></pre></td></tr></table></figure>



<h6 id="2-19-wc-命令"><a href="#2-19-wc-命令" class="headerlink" title="2.19 wc 命令"></a>2.19 wc 命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">Linux系统中的wc为英文Word Count的缩写，命令的功能为统计指定文件中的字节数、字数、行数，并将统计结果显示输出。 </span><br><span class="line"></span><br><span class="line">命令功能：</span><br><span class="line">统计指定文件中的字节数、字数、行数，并将统计结果显示输出。如果没有给出文件名，则从标准输入读取。wc同时也给出所指定文件的总统计数。</span><br><span class="line"></span><br><span class="line">命令参数：</span><br><span class="line">‐c <span class="comment">#统计字节数。 </span></span><br><span class="line">‐l <span class="comment">#统计行数。 </span></span><br><span class="line">‐m <span class="comment">#统计字符数。这个标志不能与 ‐c 标志一起使用。 </span></span><br><span class="line">‐w <span class="comment">#统计字数。一个字被定义为由空白、跳格或换行字符分隔的字符串。 </span></span><br><span class="line">‐L <span class="comment">#打印最长行的长度。 </span></span><br></pre></td></tr></table></figure>



<h6 id="2-20-od命令"><a href="#2-20-od命令" class="headerlink" title="2.20 od命令"></a>2.20 od命令</h6><p>od是英文octal dump的缩写，功能是把文件用8进制或者其他的格式显示出来，通常用于查看特殊格式文件的内容，可以用来查看不可见字符。</p>
<h6 id="2-21-du命令"><a href="#2-21-du命令" class="headerlink" title="2.21 du命令"></a>2.21 du命令</h6><p>du是英文Disk usage的缩写，表示计算某个目录在硬盘中所占的空间大小，默认情况下以kb为单位。通过递归统计每一个目录中所占用的空间大小。</p>
<p>常用参数如下:</p>
<figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line"></span><br></pre></td></tr></table></figure>


<h6 id="2-22-df命令"><a href="#2-22-df命令" class="headerlink" title="2.22 df命令"></a>2.22 df命令</h6><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">df是英文Disk free的缩写，用来统计磁盘是使用情况。</span><br></pre></td></tr></table></figure>

<h6 id="2-23-gedit命令"><a href="#2-23-gedit命令" class="headerlink" title="2.23 gedit命令"></a>2.23 gedit命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">gedit全称 GNU edit 是一个文本编辑器，类似windows里面的txt文本编辑器。编辑file文本。</span><br></pre></td></tr></table></figure>

<h6 id="2-24-管道命令"><a href="#2-24-管道命令" class="headerlink" title="2.24 管道命令"></a>2.24 管道命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">用法: <span class="built_in">command</span> 1 | <span class="built_in">command</span> 2 他的功能是把第一个命令<span class="built_in">command</span> 1执行的结果作为<span class="built_in">command</span> 2的输入。管道命令操作符是：”|”它只能处理经由前面一个指令传出的正确输出信息，对错误信息信息没有直接处理能力.</span><br></pre></td></tr></table></figure>

<h6 id="2-25-重定向"><a href="#2-25-重定向" class="headerlink" title="2.25 重定向"></a>2.25 重定向</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">在shell中，标准输入是0，标准输出是1，标准错误是2.</span><br><span class="line">使用&gt;表示重定向。1&gt;表示标准输出重定向，2&gt;表示标准错误重定向。默认情况下&gt;表示输出重定向。</span><br><span class="line"></span><br><span class="line">例如：</span><br><span class="line"></span><br><span class="line">ls &gt; list.txt   <span class="comment">#ls的输出重定向到文件list.txt中。                     </span></span><br><span class="line">find / ‐name <span class="string">&quot;*.c&quot;</span> 2&gt;/dev/null  <span class="comment">#标准错误重定向到无底洞文件。     </span></span><br><span class="line">find / ‐name <span class="string">&quot;*.c&quot;</span> 2&gt;/dev/null  <span class="comment">#标准错误重定向到无底洞文件。     </span></span><br><span class="line">find / ‐name <span class="string">&quot;*.c&quot;</span> &gt;/dev/null 2&gt;&amp;1  <span class="comment">#标准输出、标准错误重定向到无底洞文件。</span></span><br></pre></td></tr></table></figure>



<h6 id="2-26-后台运行"><a href="#2-26-后台运行" class="headerlink" title="2.26 后台运行"></a>2.26 后台运行</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">Linux中可以使用&amp;，让程序在后台运行。如：cat &amp;</span><br></pre></td></tr></table></figure>

<h6 id="2-27-awk命令"><a href="#2-27-awk命令" class="headerlink" title="2.27 awk命令"></a>2.27 awk命令</h6><figure class="highlight sh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line">awk就是把文件逐行的读入，以空格为默认分隔符将每行切片，切开的部分再进行各种分析处理。</span><br><span class="line"></span><br><span class="line">格式：awk [‐F field‐separator] <span class="string">&#x27;commands&#x27;</span> [input‐file(s)]</span><br><span class="line"></span><br><span class="line">其中，commands 是真正awk命令，[­F 域分隔符]是可选的。 input­file(s) 是待处理的文件。</span><br><span class="line"><span class="built_in">print</span> 是awk打印指定内容的主要命令, <span class="variable">$1</span> 分割出来的第一段，<span class="variable">$2</span>分割出来的第二段，依次类推，<span class="variable">$0</span>代表所有</span><br><span class="line">字段例如：</span><br><span class="line"></span><br><span class="line">ls ‐l | awk <span class="string">&#x27;&#123;print $1 &quot;\t&quot; $2 &quot;\t&quot; $3 &quot;\t&quot; $4&#125;&#x27;</span></span><br><span class="line"></span><br><span class="line">将/proc/meminfo文件中的字段提取出来，并且在每个字段前面添加meminfo:</span><br><span class="line"></span><br><span class="line">awk ‐F <span class="string">&#x27;:&#x27;</span> <span class="string">&#x27;&#123;print &quot;meminfo:&quot; $1&#125;&#x27;</span> /proc/meminfo</span><br></pre></td></tr></table></figure>




<p>原文链接：<a target="_blank" rel="noopener" href="https://blog.csdn.net/weixin_39951988/java/article/details/87613816">https://blog.csdn.net/weixin_39951988/java/article/details/87613816</a></p>

    </div>

    
    
    

      <footer class="post-footer">

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/blog/2020/10/12/%E6%A0%91%E8%8E%93%E6%B4%BE3B%E6%89%8B%E5%8A%A8%E5%AE%89%E8%A3%85java8/" rel="prev" title="树莓派3B手动安装java8">
      <i class="fa fa-chevron-left"></i> 树莓派3B手动安装java8
    </a></div>
      <div class="post-nav-item">
    <a href="/blog/2020/10/12/%E5%A6%82%E4%BD%95%E5%B0%86Raspbian-Lite%E5%8D%87%E7%BA%A7%E5%88%B0%E6%A1%8C%E9%9D%A2%EF%BC%88PIXEL%EF%BC%8CKDE%EF%BC%8CMATE%E7%AD%89%EF%BC%89/" rel="next" title="如何将Raspbian Lite升级到桌面（PIXEL，KDE，MATE等）">
      如何将Raspbian Lite升级到桌面（PIXEL，KDE，MATE等） <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-5"><a class="nav-link" href="#%E4%B8%80%E3%80%81Linux%E7%9A%84%E6%A0%91%E5%9E%8B%E7%9B%AE%E5%BD%95%E7%BB%93%E6%9E%84"><span class="nav-number">1.</span> <span class="nav-text">一、Linux的树型目录结构</span></a></li><li class="nav-item nav-level-5"><a class="nav-link" href="#%E4%BA%8C%E3%80%81%E5%B8%B8%E7%94%A8%E5%91%BD%E4%BB%A4%E8%AF%A6%E8%A7%A3"><span class="nav-number">2.</span> <span class="nav-text">二、常用命令详解</span></a><ol class="nav-child"><li class="nav-item nav-level-6"><a class="nav-link" href="#2-1-ls-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.1.</span> <span class="nav-text">2.1 ls 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-1-1-ls-l%E5%91%BD%E4%BB%A4"><span class="nav-number">2.2.</span> <span class="nav-text">2.1.1 ls -l命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-1-2-ls-a%E5%91%BD%E4%BB%A4"><span class="nav-number">2.3.</span> <span class="nav-text">2.1.2 ls -a命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-2-stat%E5%91%BD%E4%BB%A4"><span class="nav-number">2.4.</span> <span class="nav-text">2.2 stat命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-3-cd%E5%91%BD%E4%BB%A4"><span class="nav-number">2.5.</span> <span class="nav-text">2.3 cd命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-4-pwd%E5%91%BD%E4%BB%A4"><span class="nav-number">2.6.</span> <span class="nav-text">2.4 pwd命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-5-which%E5%91%BD%E4%BB%A4"><span class="nav-number">2.7.</span> <span class="nav-text">2.5 which命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-6-touch%E5%91%BD%E4%BB%A4"><span class="nav-number">2.8.</span> <span class="nav-text">2.6 touch命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-7-mkdir-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.9.</span> <span class="nav-text">2.7 mkdir 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-8-rmdir-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.10.</span> <span class="nav-text">2.8 rmdir 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-9-rm-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.11.</span> <span class="nav-text">2.9 rm 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-10-mv%E5%91%BD%E4%BB%A4"><span class="nav-number">2.12.</span> <span class="nav-text">2.10 mv命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-11-cp%E5%91%BD%E4%BB%A4"><span class="nav-number">2.13.</span> <span class="nav-text">2.11 cp命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-12-cat%E5%91%BD%E4%BB%A4"><span class="nav-number">2.14.</span> <span class="nav-text">2.12 cat命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-13-more%E5%91%BD%E4%BB%A4"><span class="nav-number">2.15.</span> <span class="nav-text">2.13 more命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-14-less%E5%91%BD%E4%BB%A4"><span class="nav-number">2.16.</span> <span class="nav-text">2.14 less命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-15-locate-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.17.</span> <span class="nav-text">2.15 locate 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-16-find-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.18.</span> <span class="nav-text">2.16 find 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-17-grep-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.19.</span> <span class="nav-text">2.17 grep 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-18-ln%E5%91%BD%E4%BB%A4"><span class="nav-number">2.20.</span> <span class="nav-text">2.18 ln命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-19-wc-%E5%91%BD%E4%BB%A4"><span class="nav-number">2.21.</span> <span class="nav-text">2.19 wc 命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-20-od%E5%91%BD%E4%BB%A4"><span class="nav-number">2.22.</span> <span class="nav-text">2.20 od命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-21-du%E5%91%BD%E4%BB%A4"><span class="nav-number">2.23.</span> <span class="nav-text">2.21 du命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-22-df%E5%91%BD%E4%BB%A4"><span class="nav-number">2.24.</span> <span class="nav-text">2.22 df命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-23-gedit%E5%91%BD%E4%BB%A4"><span class="nav-number">2.25.</span> <span class="nav-text">2.23 gedit命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-24-%E7%AE%A1%E9%81%93%E5%91%BD%E4%BB%A4"><span class="nav-number">2.26.</span> <span class="nav-text">2.24 管道命令</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-25-%E9%87%8D%E5%AE%9A%E5%90%91"><span class="nav-number">2.27.</span> <span class="nav-text">2.25 重定向</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-26-%E5%90%8E%E5%8F%B0%E8%BF%90%E8%A1%8C"><span class="nav-number">2.28.</span> <span class="nav-text">2.26 后台运行</span></a></li><li class="nav-item nav-level-6"><a class="nav-link" href="#2-27-awk%E5%91%BD%E4%BB%A4"><span class="nav-number">2.29.</span> <span class="nav-text">2.27 awk命令</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">小龙人</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/blog/archives/">
        
          <span class="site-state-item-count">7</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/blog/categories/">
          
        <span class="site-state-item-count">2</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">小龙人</span>
</div>

<!-- 用下面的符号注释，注释代码用下面括号括起来 -->
<!--
  <div class="powered-by">由 <a href="https://hexo.io/" class="theme-link" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.org/" class="theme-link" rel="noopener" target="_blank">NexT.Gemini</a> 强力驱动
  </div>

-->

        








      </div>
    </footer>
  </div>

  
  <script src="/blog/lib/anime.min.js"></script>
  <script src="/blog/lib/velocity/velocity.min.js"></script>
  <script src="/blog/lib/velocity/velocity.ui.min.js"></script>

<script src="/blog/js/utils.js"></script>

<script src="/blog/js/motion.js"></script>


<script src="/blog/js/schemes/pisces.js"></script>


<script src="/blog/js/next-boot.js"></script>




  















  

  

</body>
</html>

<!-- 页面点击小红心 -->
<script type="text/javascript" src="/js/src/clicklove.js"></script>
